GXSetStyleAttributes
You can use theGXSetStyleAttributes
function to alter the style attributes for a particular style object.
void GXSetStyleAttributes(gxStyle target, gxStyleAttribute attributes);
target
- A reference to the style object whose attributes you want to alter.
attributes
The new set of attributes.DESCRIPTION
TheGXSetStyleAttributes
function sets the style attributes of the style object specified by thetarget
parameter to be the attributes specified in theattributes
parameter.You can use this function in combination with the
GXGetStyleAttributes
function to set or clear single style attributes. For example, to clear thegxSourceGridStyle
attribute of a style object referenced by the variabletarget
, you could use this line of code:
GXSetStyleAttributes(target, GXGetStyleAttributes(target & ~gxSourceGridStyle);To set thegxSourceGridStyle
attribute, you could use this line of code:
GXSetStyleAttributes(target, GXGetStyleAttributes(target | gxSourceGridStyle);To set thegxCenterFrameStyle
attribute, you need to clear thegxInsideFrameStyle
andgxOutsideFrameStyle
attributes.When you set a style's attributes using this function, you are effectively changing the style attributes for all shapes that share the style.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory style_is_nil inconsistent_parameters (debugging version) parameter_out_of_range (debugging version) Notices (debugging version) attributes_already_set SEE ALSO
For a discussion of style attributes, see "Style Attributes" on page 3-98.For an example of pen placement, see "Manipulating Pen Width and Placement" beginning on page 3-51.
For an example of constraining shapes to grids, see "Constraining Shape Geometries to Grids" on page 3-40 and "Constraining Shapes to Device Grids" on page 3-42.
To examine the style attributes of a style object, use the
GXGetStyleAttributes
function, which is described on page 3-109.To examine the style attributes of a style object associated with a particular shape, use the
GXGetShapeStyleAttributes
function, which is described in the next section. To alter the style attributes of a style object associated with a particular shape, use theGXSetShapeStyleAttributes
function, which is described on page 3-113.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help